package com.gdpu.watermelontimer.data

import androidx.room.Entity
import androidx.room.PrimaryKey
//倒计时有关所有属性
@Entity(tableName = "pomodoro_sessions")
data class PomodoroSession(
    @PrimaryKey(autoGenerate = true)
    val id: Long = 0,
    val taskId: Long? = null,
    val sessionType: SessionType,
    val startTime: Long,
    var endTime: Long? = null,
    val duration: Long, // 计划时长（毫秒）
    var actualDuration: Long? = null, // 实际时长（毫秒）
    var isCompleted: Boolean = false,
    var isInterrupted: Boolean = false
) {
    enum class SessionType {
        WORK, SHORT_BREAK, LONG_BREAK
    }
} 